           package com.java.diagnostics.visualizer.parser.vgc.converters;
           
           import com.java.diagnostics.visualizer.data.DataPoint;
           import com.java.diagnostics.visualizer.data.TupleData;
           import com.java.diagnostics.visualizer.data.axes.Axis;
           import com.java.diagnostics.visualizer.data.axes.UnitConverterDefinition;
           import com.java.diagnostics.visualizer.data.axes.YDataAxis;
           import com.java.diagnostics.visualizer.impl.axes.AbstractUnitConverter;
           import com.java.diagnostics.visualizer.impl.axes.NonLinearConverter;
           import com.java.diagnostics.visualizer.impl.axes.UnitConverterDefinitionImpl;
           import com.java.diagnostics.visualizer.parser.vgc.constants.VGCAxes;
           import java.text.MessageFormat;
           
           public class NonLinearHeapPercentConverter extends AbstractUnitConverter
             implements NonLinearConverter
           {
             private TupleData denominator;
             private final UnitConverterDefinition definition;
           
             public NonLinearHeapPercentConverter(TupleData denominator)
             {
               this.definition = new UnitConverterDefinitionImpl(denominator.getYAxis().getAxis().getBaseUnitName(), denominator.getYAxis().getLabel(), 
                 VGCAxes.PERCENT_SIGN, false);
               this.denominator = denominator;
             }
           
             public double convert(double number)
             {
               return (0.0D / 0.0D);
             }
           
             public String formatUnconverted(double number) {
               return String.valueOf((int)number);
             }
           
             public UnitConverterDefinition getDefinition()
             {
               return this.definition;
             }
           
             public void setOffset(double offset)
             {
             }
           
             public double convert(DataPoint dataPoint)
             {
               if (dataPoint.getRawY() == 0.0D) {
                 return 0.0D;
               }
               DataPoint denominatorPoint = this.denominator.getDataPoint(dataPoint.getSequenceUID());
               if ((denominatorPoint == null) || (denominatorPoint.getRawY() == 0.0D)) {
                 return (0.0D / 0.0D);
               }
               double fraction = dataPoint.getRawY() / denominatorPoint.getRawY();
               double result = fraction * 100.0D;
               return result;
             }
           
             public String format(DataPoint dataPoint) {
               return formatUnconverted(convert(dataPoint));
             }
           
             public final String formatWithUnits(DataPoint dataPoint)
             {
               return MessageFormat.format(getFormatWithUnitsPattern(), new Object[] { format(dataPoint), getUnitName() });
             }
           }

